{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "3f64bd6b3261495f8146fc4179699876",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "interactive(children=(FloatSlider(value=0.0, description='T1', max=1.0, min=-1.0, step=0.05), FloatSlider(valu…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<function rendering.eye_model_visualize(T1, T2, T3, R1, R2, R3, r_pupil, r_iris, L, fx, fy)>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from ipywidgets import interact, interactive, fixed, interact_manual\n",
    "import ipywidgets as widgets\n",
    "import matplotlib.pyplot as plt\n",
    "#%matplotlib inline\n",
    "%matplotlib widget\n",
    "\n",
    "from rendering import eye_model_visualize\n",
    "     \n",
    "# T1 = 0.; T2 = 0.; T3 = 0.\n",
    "# R1 = 0.; R2 = 0.; R3 = 0.\n",
    "# r_pupil = 0.\n",
    "# r_iris = 0.\n",
    "# L = 0.\n",
    "# fx = 0.; fy=0.\n",
    "# eye_model_visualize(T1, T2, T3, R1, R2, R3, r_pupil, r_iris, L, fx, fy)\n",
    "\n",
    "T1 = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "T2 = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "T3 = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "R1 = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "R2 = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "R3 = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "r_pupil = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "r_iris = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "L = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "fx = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "fy = widgets.FloatSlider(value=0.0, min=-1.0, max=1.0, step=0.05)\n",
    "\n",
    "interact(eye_model_visualize, T1=T1, T2=T2, T3=T3, R1=R1, R2=R2, R3=R3,\n",
    "          r_pupil=r_pupil, r_iris=r_iris, L=L, fx=fx, fy=fy)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.7.1 ('ellseg_debug')",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "d42df581a0d51b7b2e8277550ad90956e1dee5465a4328c81794c2929d0b4a67"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
